package com.ly.gof.behavioral.strategy;

/**
 * @author liuyang
 * @des
 * @Version 1.0
 * @Date: 02/08/2021 16:40
 */
//环境（Context）类：持有一个策略类的引用，最终给客户端调用。
public class Context {
    private Strategy strategy;

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public void strategyMethod() {
        strategy.strategyMethod();
    }
}
